package com.meida.module.bus.provider.handler;

import com.meida.common.base.entity.EntityMap;
import com.meida.common.mybatis.interceptor.PageInterceptor;
import com.meida.common.mybatis.model.PageParams;
import com.meida.common.mybatis.query.CriteriaQuery;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Component;

/**
 * @Description: 商品列表处理类
 * @ClassName BusProductHandler
 * @date: 2022.06.22 08:46
 * @Author: ldd
 */
@Component("busProductPageHandler")
public class BusProductPageHandler implements PageInterceptor {
    private static final Logger log = LogManager.getLogger(BusProductPageHandler.class);

    public BusProductPageHandler() {
    }

    @Override
    public void prepare(CriteriaQuery cq, PageParams pageParams, EntityMap params) {
        Long topicId = params.getLong("topicId");

        cq.eq(true, "product.deleted", 0);
        cq.eq(true, "product.onLineState", 1);
    }
}
